/**
 * @author mashaodong
 * @function 处理一些错误信息
 */

import { Message } from "element-ui";

export function joinRoomError() {
  if (this.joinStaus) {
    Message({
      type: "error",
      message: "您已经在房间中",
    });
    return false;
  }
  return true;
}

export function leaveRoomError() {
  if (!this.joinStaus) {
    Message({
      type: "error",
      message: "您目前不在房间中",
    });
    return false;
  }
  return true;
}

export function myMessage(type, message) {
  Message({
    type: type,
    message: message,
  });
}
